(navigation image)
Home American Libraries | Canadian Libraries | Universal Library | Community Texts | Project Gutenberg | Children's Library | Biodiversity Heritage Library | Additional Collections
Search: Advanced Search
Anonymous User (login or join us)
Upload
See other formats

Full text of "Syntax ZX80 - Vol 3 No 3 (1982-03)(Harvard Group)(US)"

SYNTAX ZX8CT 

A PUBLICATION OF THE HARVARD GROUP 



VOL.3 NO. 3 



ISSN 0273-2696 



MAR.. 1982 



IN THIS ISSUE 

8K Programs 

Income Tax 8 

Flashing Prompts 19 

Video Artist 10 

Beginners' Column 

Translating Programs . . 3 

Book Review 

Machine Language Pro- 
gramming Made Simple. 20 

Classified Ads 21 

Curing 16K Dumping 20 

Dear Edi tor 14 

Hardware 

ZX Printing 4 

Kit Misunderstanding.il 

Hardware Hints 7 

Hardware Review 

Marex ROM Switch. . . . . 16 

Machine Language 

Flags Register 17 

News /New products 1,2 

Numbers Held Inaccurately 
on the ZX81 6 

Program corrections and 
improvements 2 

Software Review 
Computacalc and 
Video-Plan 18 

Software Hint 5 

Users ' Groups 15 

Index of Advertisers 

Bani-Tech 17 

Kopak Creations 19 

LJH Enterprises 11 

Mindware Co 6 , 16 

RKL Systems 20 

S & S Co 18 

Sinclair Research. .. 12 , 13 

Softsync 3 

Syntax 21 

Zeta Software 7 



IAN LOGAN WINS FIRST ANNUAL ROSETTA STONE 

Dr. Ian Logan of Skellingthorpe , UK, a 
frequent SYNTAX contributor, won the first 
annual Rosetta Stone award sponsored by 
Mindware Co. of Way land, MA. Given for the 
best independent product-- application, soft- 
ware package or peripheral-- for ZX80/ls, 
future prizes will be awarded by SYNTAX 
editors. Dr. Logan won $100, a US computer 
magazine subscription, and a Rosetta Stone 
replica for his 8K ROM disassembly. 

To nominate a product for next year's 
award, send the developer's name, address, 
and phone number with a description. To 
enter a product, also send the item plus 
documentation to SYNTAX Rosetta Stone Award, 
RD 2 Box 457, Harvard, MA, 01451. 

TIMEX TO MARKET SR PRODUCTS IN NORTH AMERICA 

Sinclair just announced a license with 
Timex to manufacture and retail Sinclair 
computers, peripherals and software via Timex 
outlets in N. America. Expect the change 
this fall. Sinclair will then stop selling 
by mail and you can buy Sinclair products at 
stores. We don,' t know which stores yet. 

64K RAM AVAILABLE MID-MARCH 

Memotech's new 64K plug- in RAM will be 
available in March for $199 US. Contact 
distributor Gladstone Electronics, 901 
Fuhrmann Blvd, Buffalo, NY 14203, or 1736 
Avenue Rd, Toronto, Ontario M5M 3Y7. 

AUTHORIZED SINCLAIR REPAIR SERVICES 

MicroSync Services will take over 
Sinclair's repair work for ZX80s and ZX81s 
(kits and assembled) and 16K RAMs . They also 
offer $10 yearly maintenance contracts. Send 
SASE to MicroSync Services, Customer Service 
Dept, 162R Marlboro St, Keene, NH, 03431. 



SYNTAX ERROR: Lawrence Souder 
reported an error in his 4K Phone 
Number Word Generator program 
(Feb. 82). Line 110 should read 
NEXT Z, not NEXT X. 
Lori Olson's simultaneous equa- 
tion program contained two typos: 
80 FOR H=l TO 1-1 
110 NEXT J 

PROGRAM IMPROVEMENTS 

Tom Finley sent these improvements 
to R.F. Fraser- Smith's 8K Digital 
Clock (Nov. 81): 

200 IF H<10 THEN LET D=19 

201 IF H>=10 THEN LET D=18 

202 IF M<10 THEN LET E=22 

203 IF M>=10 THEN LET E=21 
206 PRINT AT 2 1 ,D; H; " : 00" 
208 PRINT AT 21,E;M;" ";M$ 

To run Hexadecimal Math (Dec. 81) 
with an 8K ROM, make these changes 
from Leo Morgan of Peabody, MA: 
90 DIM (2) 
180 LET N(1)=D 

2 30 LET N(2)=D 

240 IF C=2 THEN LET D=N(1)+N(2) 

250 IF C=3 THEN LET D=N(1)-N(2) 

260 IF C=4 THEN LET D=N(1)*N(2) 

270 IF C=5 THEN LET D=N(1)/N(2) 

3 70 FOR X=1 TO 4 
500 DIM H(4) 

580 PRINT CHR$ (H(4));CHR$ (H(3 
));CHR$ (H(2));CHR$ (H(1)); 

Clifford Efaw of Morton, WA, sent 
these changes to run 4K Blackjack 
(Jan. 82) with 8K ROM: 

370 LET X=INT (X*52)+1 

670 PRINT P(Z),CHR$ (15) 

DEFENSIVE AWARI 

I finally figured out the 
computer's defensive moves for my 
Awari program (Feb. 82) to improve 
the play for better players. These 
additions foresee the consequences 
of a second move by the human, 
improving the original version in 
Basic Computer Games. The addi- 
tions yield approximations only-- 
they don't add a point to the 



opponent's score for passing home 
on the way to a zero pile or for a 
second move--but in general they'll 
make the right move. The change in 
line 330 avoids repeating a previ- 
ous 'move. You can eliminate lines 
270-290 since the Sinclair won't 
invariably move pile 1 following 
pile 4 and leave you to move pile 5 
for 6 points. Unfortunately the 
initial move is always pile 4, 
which is a bit repetitious. 
Change these lines : 
3 30 LET Hl=-99 

371 LET Q=0 

372 FOR T=1 TO 6 

373 IF A(T)=0 THEN GOTO 381 

374 LET R=0 

375 LET U=A(T)+T 

376 IF U>14 THEN LET U=U- 1 4 

377 IF U=7 THEN LET A(T)=0 

378 IF U=7 THEN GOTO 372 

379 IF A(U)=0 THEN LET R=A ( 1 4-U 
) + 1 

380 IF R>Q THEN LET Q=R 

381 NEXT T 

382 LET H2=A(14)-A(7)-Q 

• 390 IF M=14 AND K=2 THEN LET H2 
=H2+2+Q 

400 IF ABS(H1-H2)<1 THEN LET H2 
=H2+RND-.5 

Jon Passler, Beverly, MA 

EDUCATIONAL SOFTWARE VENDOR 

Edson Electronics now offers 
educational programs for ZX80/81s 
with elementary school level arith- 
metic, spelling, and counting 
exercises (9 learning plus 3 game 
programs). Programs require 8K 
R0M/2K RAM. Listings plus documen- 
tation are $14.95, tapes are $12.95 
(both for $24.95). Edson also has 
a digital VU meter for $28.95 to 
monitor cassette loading and help 
eliminate loading problems. Edson 
Electronics, PO Box 151211, Tampa, 
FL 33684, 813/870-0282. 

Remember to return your white 
renewal card within two weeks of 
our postmark to get a free SYNTAX 
magazine binder. 



TRANSLATING PROGRAMS: ON... GO TO 

Revising some programs for use 
on your ZX80/81 requires total 
knowledge of that computer language 
and its usage. One such term that 
you will stumble over is the 
ON... GO TO or ON... GO SUB state- 
ment. A program line might read: 
90 ON X GO TO 100,10,333,2000,59 

The computer compares the 
value of X with the line. If X=l 
then it will GO TO line 100, if X=2 
then line 10, if X=3 then line 333, 
etc. The same thing will happen if 
the line reads : 
90 ON X GO SUB 100,10,333,2000,59 

Notice that if X does not 
equal any number 1-5, the computer 
moves to line 91. In other words, 
if X equals a negative number, 
zero, or a number greater than 5, 
the computer skips that line. 

One- revision method is to list 
the numbers : 

90 IF X=l THEN GOTO 100 

91 IF X=2 THEN GOTO 10 

92 IF X=3 THEN GOTO 333 

If you use GO SUB instead of 
GOTO, check for RETURN statements. 
For instance, if line 92 reads IF 
X=3 THEN GO SUB 333, then a line 
following line 333 must have a 
RETURN statement. 

A second revision method is 
the COMPUTED way, like 90 GO TO 
X*100. If X=3, the computer goes 
to line 300. Using this method, 
the computer will go to any value 
of X (it will even search for a 
negative line number) . 

A third revision method is the 
DIM- ARRAY way, using a dimensioned 
array containing the line numbers . 
See SYNTAX (Dec. 81 p. 18) for this 
type of data storage. 

The computed method uses the 
fewest bytes and runs at the slow- 
est speed, since it must compute 
each GO TO. The listed way is 
somewhat faster. The array method 
is quick if the DIM statement is 
near the beginning of the program. 

Mort Butler, BW Sabre, Houston, TX 



T 



/ ZXCHESS is the fastest, most 
y versatile chess program 

available for the Sinclair. With 

seven levels of play, ZXCHESS 

has the ability to accept and play , 

all standard chess moves in- 1 

eluding castling and en passant | 

captures. 

This sophisticated program has a detailed «■ 
display of the playing board and allows you to ^ 
change sides and even levels of difficulty during 
a game. 

You can set up the board at any point in the 
game to examine a special position. If you get 
stymied, the program will even suggest a move,, 
for you. I J 

$24.95| 
IALSO AVAILABLE 

SUPER INVASION REVERSI ROAD TO RICHES 

CYBORG WARS WALLBUSTERS SPACE TREK 



MACHINE LANGUAGE 
PROGRAMMING... 

TEN EXCITING PROGRAMS 
FORTHEZX81:1K 



UNDERSTANDING YOUR 
ZX81 ROM 

DIRECTORY/RECORD 




WRITE FOR FREE CATALOG 



C Please send me _ 
@ $24.95 each. 
□ Please send me _ 



copiesof ZXCHESS 

.copies of 

. Please send me a free software catalog 
I enclose 

Please add $1.50 shipping & handling 
New York residents add sales tax. 

SEND CHECK OR MONEY ORDER TO: 

SOFTSYNC, i/VC. 

PO Box 480, Murray Hill Station, New Mxk, NY 10156 (212) 685-2080 

Foreign orders must be paid by International Money Order or 
foreign draft in U.S. Dollars drawn on a New York bank. 

NAME 



ADDRESS . 
CITY 



STATE/ZIP. 



TECHNICAL DETAILS FOR ZX PRINTING 

Although Sinclair's printer is 
not available in the US yet, we got 
a British model and dissected it. 
We suggest that when and if you get 
one, you NOT dissect it--it's 
surprisingly tough to reassemble. 
Here's how the ZX printer talks to 
the 8K ZX80/81. (The 4K ROM does 
NOT support printing.) With this 
info you can start interfacing dot 
print mechanisms to ZX81s. 

Your computer contains a 33- 
byte buffer in RAM, named PR- BUFF, 
starting at address 16444. In the 
ROM, routines for LPRINT, LLIST and 
COPY take character codes from this 
buffer, transform them to dot 
patterns using patterns stored in 
ROM beginning at 1E00H, and send 
them to the bus for the printer to 
use. The ZX printer accepts this 
SERIAL data and prints DOTS to form 
characters . 

Data to the printer consists 
of instructions to draw a picture 
of the characters, one 32- character 
(or 256-dot) line at a time. Eight 
consecutive lines of dots form one 
row of characters. 

Although the computer and the 
printer exchange several pieces of 
data, the principal data are the 
request from the printer to send 
the next dot and the instruction 
from the computer to print the next 
dot. Auxiliary signals tell the 
printer how to control the motor 
and inform the computer that the 
printer is connected and the stylus 
is on the paper. All signals pass 
in and out through the Z80 accumu- 
lator, or A register. 

ZX printers function like a TV 
picture, scanning from left to 
right. A belt pulls a conductive 
stylus quickly across the paper, 
and where a black dot is wanted a 
pulse of current is passed through 
the stylus. This evaporates the 
aluminum coating on the paper, 
exposing the black backing. To 
avoid the need to return the stylus 
rapidly to the left hand edge of 



the paper, two styli, equally 
spaced on a moving belt, follow 
each other. Thus one leaves the 
paper as the other arrives in quick 
succession. The belt and the paper 
feed roller are both driven contin- 
uously while printing, so when the 
next stylus comes round the paper 
has moved up to the next line. 

So that the styli always stop 
off the paper, the BASIC commands 
slow the motor for the last two 
scans before stopping-- this makes 
the graphics join up if done in 
several goes; put this feature in 
any machine language program that 
requires the printer to stop while 
the computer works out the next 
line. At full speed, each pen is 
on the paper for about 32mS and off 
it for about 16mS. Since the motor 
speed can vary, an encoder disc is 
used to give 256 pulses across a 
92mm printing width (allowing 4mm 
margins). These pulses are syn- 
chronized with the stylus hitting 
the paper to keep the printing 
vertical. 

There are about 60uS between 
the starts of successive pulses at 
full speed. 

The printer is wired as a Z80 
I/O port, selected by A2 being at a 
low level--no other address lines 
are recognized. Sinclair always 
calls this port as OOFBH (251dec) 
in software, but does not fully 
decode the address in hardware. So 
to send information to the printer 
use the Z80 command: OUT(FB) ,A-- 
OPCODE D3 FB, assuming the data is 
in register A. The data bits have 
the following meanings: 

D2 high means stop the motor, 

low means start it. 
Dl high means put the motor at slow 

speed--D2 high overrides this 
D7 high applies power to stylus. 

On the printer side of the 
interface all these lines remain in 
the state they were last, until new 
data is sent to the printer. At 
switch on, or after pressing the 



feed button, Dl and D7 are set low; 
D2 stays high after feed. The 
other data lines aren't used. 

To fetch information from the 
printer, the Z80 instruction: IN A, 
(FB)- -OPCODE DB FB--will put data 
into the accumulator. These bits 
are used: 

D6 will be read as low if the 
printer is there, high if it 
isn't, and is used solely to 
check if printer is connected. 

DO is the signal from the encoder 
disc. 

D7 is high when the stylus hits the 
paper. 

DO and D7 are both latched on the 
printer side of the interface so 
they remain high until the computer 
writes something to the printer. 
So even if you don't make use of 
the information you read in, use an 
output instruction with appropriate 
data to reset the latches until the 
next signal. These bits may be in 
either state on switch on, and are 
unaffected by the feed button. The 
paper detect signal is also used 
internally by the printer to make 
sure the styli stop off the paper. 
If power is applied to the stylus, 
the paper signal will go high even 
if the printer is between scans; 
turn the stylus off before trying 
to detect the paper edge. 

All printing is done in FAST 
mode. The COPY command prints a 
full screen in 12 seconds. 

All ROM code to control print- 
ing appears to lie between 0802H 
and 0918H, based on a quick look at 
Ian Logan's ROM disassembly. A 
call to 0871H (USR 2161) prints the 
characters stored in the printer 
buffer, then clears the buffer. 

SYNTAX (02/08/13) describes a 
port interface, including a schema- 
tic for another address, that you 
can easily modify. Simply use 
address lines A0-A7, IORQ, and RD 
or WR to select address, port, and 
direction. Use D0-D7 to carry data 
to and from the accumulator. Use 



74LS75s to latch the data in and 
out, and use LS-series gates else- 
where when they connect to the 
ZX80/81 bus. 

You can use Ian Logan's anno- 
tated ROM disassembly to examine 
the Sinclair software that executes 
the LPRINT, LLIST, and COPY func- 
tions. You can move the COPY- BUFF 
and output routines to RAM using a 
program suggested in Sinclair's 
printer manual. First POKE 16389, 
124 and NEW to set aside memory for 
the machine language routine. 
Next, use the following code to 
move the ROM routine to RAM. 

5 FOR 1=0 TO 112 

6 POKE 31744+1, PEEK (2161+1) 

7 NEXT I 

9 POKE 31857,201 
Call this routine using USR 31744. 

This routine will now read 
character codes, which you must 
POKE into PR- BUFF, and translate 
them into dot codes using the 
patterns in ROM. The buffer is NOT 
cleared by this routine. 

If you want to store different 
patterns, POKE them into the 256 
bytes starting at 32256 (the space 
is already set aside) and POKE 
31800,63 (to restore the ROM as dot 
source POKE 31800,15). 

Each successive byte stores 
the 8 dots for a row of printout of 
one character. The ninth byte thus 
contains the first row of the 
second character in the set. By 
defining bit patterns here you can 
define a new character set. Speci- 
fy all 8 bytes for each character. 

SOFTWARE HINT 

My son finished off a recent 
program for me thusly: 
9950 SAVE "Name of. Program" 
9960 GOTO (First line of Program) 
To SAVE this on tape, I just type 
GOTO 9950 instead of the more time- 
consuming SAVE "Name of Program". 

Herb Sturges , Orinda, CA 



COMPUTACALC + 



am -'-... ••'^-'-■ x -\- 



«io»«- 




... a powerful combination at a bargain price! 

MINDWARE introduces COMPUTACALC. 

a low priced software package tor 
the ZX01. COMPUTACALC is an 

electronic worksheet with an 

almost unlimited range 

o. applications. CONSIDER: 

Financial lorecasts 
Engineering calculations 
Productivity analyses 
Pricing 
Job costing 
Estimating 
Production scheduling 

A versatile tool for $39.93 

Requires 16K RAMPAK 
mindware has a catalog of 
software, hardware and books 
for the 2X81. 

Write 

"TT?fS ., MINDWARE CO. 

.'•4. *-a M* Z"'t P'OOuiis "*■*' supp/*'"e«f mature \ compute? 



NUMBERS HELD INEXACTLY ON THE ZX8] 

This is the first of several 
articles by Dr. Frank O'Hara on 
numerical errors in the ZX81's 8K 
ROM floating point. --AZ 

All floating-point systems 
require certain techniques of 
rounding, general approximation and 
slightly over- or under-stating 
numbers to make the arithmetic 
work. The problem is particularly 
acute in the ZX81 because 1) all 
numbers, even integers, are held in 
floating-point form; 2) of the 
almost total lack of instruction in 
floating-point techniques in the 
manual or the literature; and 3) 
the limitation of the ROM to 8K and 
the premium on every byte. 

In doing arithmetic on the 
ZX81, it helps to know just which 
numbers are held exactly in its 
BASIC and which are not. This 
small program shows you exactly how 
any number is held on the ZX81: 



Program 1 
10 INPUT X 

20 LET V=PEEK 16400 +256*PEEK 
16401 

30 FOR I=V+1 TO V+5 
40 PRINT PEEK I;" 
50 NEXT I 
60 PRINT 
70 GOTO 10 
INTEGER POWERS OF 2: To use this 
program, RUN it and first enter 
to satisfy yourself that is held 
as five zeros as the manual says. 
Then try some small integer powers 
of 2, like 1 (or 2°), 2, 4, 8. 
You'll get 129 0; 130 
0; 131 0; and 132 0. 
Before explaining this, let me give 
you a program to generate all 
integer powers of 2 from 1 to 126. 
First delete Tine 10 from Program 1 
and replace 3 Lne 70 with 70 RETURN. 
Then add these lines to give: 
Program 2 
(lines 30- 7T .rom Program 1) 

100 LET X=l 

120 FOR J=l TO 126 

130 PRINT J;" "; 

140 LET X=2*X 

150 GOSUB 30 

160 NEXT J 
Finally, make line 20 be line 110 
and delete the old line 20. To 
run, press GOTO 100 then NEWLINE 
(NL) or ENTER. The first 22 powers 
of 2 wr*H appear, each in the form 
(129 plus n) for the nth 
power. To see the other 5 screen- 
fuls , continue in FAST at about 7 
seconds per screenful. You should 
then be convinced the manual has 
got it right on this point. After 
seeing the 126th power (255 
0), try PRINT 2*X. You'll get 
report 6/0 for arithmetic overflow. 
The ZX81 cannot hold. 2 to the 127. 
To see the negative powers of 
2, replace line 140 by LET X=X/2 
and change 126 to 140 in line 120. 
RUN 100 and you get the powers from 
2" 1 (128 0) to 2-128 (10 
0). From -129 to -140 the powers 
should all be held as zero (0000 
0) , but here we meet our first 
quirk of the ROM. On division by 



2, 2 -128 becomes 2 -129 and is 
promptly rounded up to 2~^- 2 ° again! 
So our innocuous little program has 
got us stuck here. Try LET X=X/4, 
then GOTO 30 (NOT RUN 30) and you 
will get and of course 
report 7/70 (RETURN with no GOSUB) . 
If you have the patience to run the 
program again with 128 in line 120, 
you can use this same method to get 
a zero result for 2"130_ If you 
want a zero result for 2~129 you 
have to fall back on the the 
otherwise less accurate type of 
expression LET X=2**-129. 

So we have a simple way of 
generating the exact representation 
of integral powers of 2 on the ZX81 
(except for 2" 129), We se e that, 
as we expect from the manual, 2 n is 
given by (129 plus n) where 
n equals -128 to 126 inclusive. 

Now compare these exact 
results with the expression 2**N. 
To do this , produce Program 3 from 
Program 2 : Make sure that line 120 
contains 126 and change line 140 to 
LET X=2**J. RUN 100 and note the 
19 inaccuracies at the powers 13, 
26, 27, 31, 52-54, 61, 62, 104-108 
and 121-125. Running the negative 
powers reveals similar inaccuracies 
at corresponding negative powers. 

Note in particular that PRINT 
2**13-8192 gives .000022888184. 
That extra 6 in the last byte is 
3/2 1 ?, about .00002. The inaccur- 
acy arises because the ROM evalu- 
ates 2**13 by approximate methods 
as EXP (13*LN2). Of course, 
8192.00002 may be accurate enough 
for most purposes, but it may help 
you to know that it is not com- 
pletely accurate and you can always 
get it exactly if you need it by 
2*2**12. The same holds for any 
other inaccurately held powers . For 
example, the important number 2^1 
is given exactly by 2*2**30 or by 
2**32/2. So Euler's famous prime 
can be got quickly by 2**32/2-1. 
Next month: Positive integral 
powers of 10. 

Frank O'Hara, Surbiton, Surrey, UK 



NEW ZX81 IK PROGRAMS by ZETA Software 
on cassette tape with listings 



ZETAPAK #1; WAR GAMES 
Bomb Run, Sub Hunter, Barrage, 
Fighter Pilot*, Torpedo Alley*, 
& Dragon's Teeth*(tank battle) 

ZETAPAK #2:BASICAL.LY BASIC 
RANDom POKEr, Loop de loop, IF 
I May, InVarlablely DIsARRAYed, 
Return Address, & PseudoPause 

ZETAPAK #3; SCIFI FANTASY 
Planetfall*, Hyperspace Display, 
Wormhole*, Arcade Invaders, Star 
Catcher*. & Turret Laser 

IS9.95 each pak or all 3 for S24.9TI 

TO ORDER ... Seno payment plus $2.50 
S&H to: ZETA S0FTWARE/P0 Box 3522 
Greenville, SC 29608-3522 

Or write for catalog of 50+ titles. 
In Europe, send Inquiries only and U$l 
bill or DM2 stamp to: DELTASOFT ZP2, 
0sterfeldstr.79d,D-2000 Hamburg 54.GER 



HARDWARE HINTS 

Overheating: EZUG (Educational 
Users' Group) newsletter F.-nrts a 
reader's solution to over ing. 

He filed off the raised ZX81 name, 
then put a solid block of steel 
about the size of a pack of cigar- 
ettes on top of the case. A simi- 
lar copper block copper keeps the 
transformer cool. Reprinted by 
permission, EZUG Newsletter, Jan/ 
Feb 82, p. 16, Highgate School, 
Balsall Heath Road, Birmingham B12 
9DS England. 

Memory Loss: One of SYNTAX'S 
machines displayed memory loss , 
partial characters and other 
strange symptoms. We tracked it to 
defective solder joints on the 
component side of the board at the 
regulator IC. Under a magnifier, 
defective joints look like conical 
pits around one or more of the 7805 
pins. Touching up the solder cured 
all the symptoms. 



INCOME TAX--8K/16K 

It's that time of year again 
and I hope that TAX will reduce 
some of the nuisance of tax return 
preparation, if not the pain in the 
pocket. It is designed to aid in 
year-end form preparation and also 
to allow periodic monitoring of tax 
liability during the year. You may 
be able to reduce the amount with- 
held from your salary or the amount 
of your quarterly payments if self- 
employed. Personally, I'd rather 
have the money during the year than 
have the IRS hold it for me. 

Lines 100-152 provide the main 
menu of functions with line 170 
serving as an error trap for acci- 
dental entries. You can quickly 
see the program's various capabil- 
ities. Tax calculation includes 
all arithmetic and transferring 
totals to appropriate lines. 

The PAUSE subroutine at lines 
6000-6030 allow you to view various 
displays as long as desired before 
proceeding. The form selection 
subroutine is at lines 7000-7214. 
Although this listing includes only 
Form 1040 and Schedule A, you can 
add any additional forms using the 
same principles illustrated. The 
particular variables allow this 
flexibility. Z is the offset in 
line numbers for each form with 
allows all line numbers and des- 
criptions to be stored in a single 
sequential array but allows you to 
enter the line numbers on the IRS 
form. P is the number of "pages" 
used to display the given form. 
Each value of J is the starting 
line for each display page; each 
value of K is the ending line. 
This allows overlap of displays as 
appropriate . 

Lines 1000-1120 provide the 
data entry function and begin with 
form selection through GOSUB 7000. 
You are then prompted for line 
number and amount. The amount is 
added to the previous total for 
this line and the new total 
displayed. This allows periodic 



updating during the year and 
revisions during year-end form 
preparation. Make negative correc- 
tions by entering negative numbers . 

Lines 2000-2248 perform all 
arithmetic for lines that require 
it. Schedule A (lines 2200-2248) 
must be done first so that Form 
1040 (lines 2100-2182) will have 
that information. Lines 2120-2122 
require you to refer to the tax 
tables for the tax on the amount in 
Form 1040 line 34. Lines 2124-2126 
request any additional taxes. The 
"bottom line" is displayed by lines 
2174-2178. In the calculation of 
Schedule A, the total deduction is 
displayed by 2242. 

Lines 3000-3080 allow you to 
view all line items on the form 
selected. GOSUB 7000 illustrates 
its usefulness here by allowing a 
short subroutine to serve for all 
present and future forms . Line 
numbers, descriptions and amounts 
are presented. Changing the line 
number I to 1$ makes for a more 
attractive display. 

Lines 4000-4060 record the 
program and all variables, includ- 
ing line descriptions and amounts. 
This also makes the program self- 
starting upon LOADing and elimin- 
ates the danger of erasing every- 
thing with a RUN instead of a GOTO. 

Lines 5000-5030 erase all line 
amounts to let you keep the line 
descriptions intact when starting a 
new tax year. 

Lines 9000-9050 are for 
initializing the program. The REM 
statements indicate direct commands 
that should be entered when the 
program is being initialized. Line 
descriptions are typed in by first 
commanding GOTO 9020. The prompt 
provides a guide to the maximum 
length of the description (18 
spaces) by printing 16 *s after the 
line number. The direct command 
LET J=l allows later addition of 
forms and line descriptions. 
Setting J to the new line number 
saves previous entries. The number 
10 7 is the total lines in Form 1040 



8 



and Schedule A. If you add more 
forms to the program, you must 
increase 107 wherever it occurs. 

After initializing TAX, enter 
GOTO 100 to get to the main menu 
and either begin using it or record 
it for later use. 

Lane Lester, Lynchburg, VA 

Enter all data that cannot be 
computed on Form 1040 or Schedule 
A. Run CALCULATE TAX routine on 
Schedule A first; totals are auto- 
matically transferred to Form 1040. 
For lines on Form 1040 with sub- 
lines a, b, c and d, enter each 
sub- item to the main line number. 
The screen shows the latest entry 
and the total. You can only go 
forward through the form; enter 
zeros until the main menu comes up 
to go back.--K0 

(Mar. 82 listings are printed on a 
Sinclair ZX printer. Comments?) 

'i^PRINT RT 3.. Sj ; "INCOME TRX RE 
^RINT RT 6, 4.; "PRESS DESIRED 






JRT 8,6; "1. ENTER DRTR 

rt :9,,e;< u s« crlgulrte 

fiT,,10,e;"3. REUIEU DR 

I^R#xiMT, fVT X\s6;"4. .RECORD DR 

fcjpftlNT 1 " RT 12 , 6.: "5 . ERRSE RLL 

rSfiBSi** 1 - 1 ' '' 

S-PRUSE, 40800 

70 ^K$£"^ K OR^K*>" 5 « THEN GO 

TO*.!*©*'--" 

ISO GOSUB_ URL K»» l»— 

iSS I _ 

1810 PRINT RT 6..S.:"l_INE NUMBER" 

1820 INPUT Y 

1030 PRINT RT s..ae:Y 

104.0 LET X=Y+Z 

1OS0 PRINT RT S..S.; "RMOUNT *" 

1060 INPUT R 

1070 PRINT RT S,16;R 

1080 LET L (X) =L(X) +R 

1090 PRINT RT 10,8,"TOTRL *";L( 

X) 

1100 GOSUB 6000 

1120 GOTO 100 

1999 REM . 

2000 GOSUB 7Q<_ _ 
£020 GOSUB ORL k** 188+2080 
2030 RETURN 

2099 rem aEHMBBB 

2100 LET L (21) =0 
2102 FOR 1=7 TO 2© 
2104 LET L (21) =L <21> <-L *I* 



2106 
2108 
2110 
2112 
2114 
2116 
2117 
2118 
2120 

R $•■; 

2122 
2124 
ONRL 
2126 
212© 
2130 
2132 
2134 
2136 
2138 
2140 
2142 
2144 
2146 
2148 
2150 
2152 
2154 
2156 
2158 
2160 
2162 
2164 
2166 
2168 
2170 
2172 
2174 

2176 

. .. $ . 

2178 
2180 
2182 
2199 
2200 
2202 
0) =0 
2204 
2206 
2208 
2210 
5) =0 
2212 



NEXT I 

LET L (30) =0 

FOR 1=22 TO 29 

LET L.(30) =L (30.* +L CI J 

NEXT k 

LET LC31) 

LET L 

LET L 

PRINT 

L (34) 

INPUT 

PRINT 

TRXE5 

INPUT 

LET L 

LET L 

FOR 

LET 



(32) 

(34) 

RT 



=L (21) -L (30) 

=L (107) 

=L (31) -L (32) -L (33.* 

21,0; "ENTER TRX FO 



L (3S) 
RT 21 



8; "ENTER RDDXTI * 



L (36) 

(37) =L (35) +L (36) 

(46) =0 
1=38 TO 45 
L (46) =L (46) +L CI) 



NEXT I 

LET L (47) =L (37) -L C4-6) 

LET L (54) =0 

FOR 1=47 TO 53 

LET L (54) =L (54-) -fL CI) 

NEXT I 

LET L (62) =0 

FOR 1=55 TO 61 

LET L (62) =L (62) +L CI) 

NEXT I 

LET X=L (62) -LCS4-.) 

IF X<0 THEN GOTO 2166 

LET L (63) =X 

LET L C64-) =L (S3* -L C6S) 

GOTO 2174- 

LET L (63) =0 , - 

L (64) =0 

L(6S)=0 

L (66) =X*<-1 , 

1=63 TO 86 | 

RT 1-53,0^1;" ";C$CIJ 



I 



LET 
LET 
LET 
FOR 
PRINT 
L (±) 



NEXT I 
GOSUB 6000 
RETU RN 

REM HZ 

LET L(70) =L (63) -L (69) 
IF L(69)>L(68) THEN LET 



L(7 



LET L (73) =L (70) +L (71 J *L (72) 

LET L (74.) =.03*L C3i> 

LET L (75) =L(73) -LC74-) 

IF L(74)>L(73) THEN LET L (7 

LET.^L (76) =L (67) +L (75) 

LET L (82) =L (77.) +L (78) +L (79) 



£214 

+L (88) 4L (31) 

2216 LET L (86) 

2218 LET L(90) 

2220 LET L (95) 
+L (94) 

2222 LET 

2224 LET 

2226 LET 

2228 LET 

2230 LET 

2232 LET 

2234 LET 

2236 LET 



=L (83) +I_ (34) +L (85) 
=L (87) +L (88) +L (89.* 
=L (91) +L (92) +L (93.) 



'. 



L 
L 
L 

L 
L 
L 
L 
L 



=L(96) +LC97) 
=L (76) 

=L(S2) 

=L (36) 

=L (90) 

=L (95) 

=L (93) 

=L (99) +L C100) +L (1 



(98) 

(99) 

(100) 

(101) 

(102) 

(103) 

(184.) 

_ (105) 

01) +L (102) +L (103) +L (104) 
2238 LET L ( 107) =L (185) -L C 106) 
2240 IF L (106) >L (105) THEN LET L 
( 107) =0 

2242 PRINT RT 15,0; "4-1 ";C*(107> 
.: " *";L(107) 
2244 GOSUB 6000 
2248 RETURN 

2999 REM 

3008 GOSUB 7000 
301© FOR N=l TO P 
3820 FOR I=J (N) TO K (N) 
3025 LET I*=STRS I 



-: 



3038 
(I+Z) 
384-0 
3050 
3B70 
30S0 
3939 
4880 
483.0 
DER" 
4.020 



PRINT 1$; " 

NEXT I 

GOSUB 6000 

NEXT N 

RETURN 

REM 

CLS 

PR INT OT © 



C$(I+2» 



*";L 



,?.;"PREPflRE RECOR 
10.. 3.: "PRESS RNY KE 



PRINT RT 
Y UHEN READY" 
4030 PRUSE 40000 
404-0 CLS 
4050 SRUE "TflB" 
4868 GOTO 100 

4999 REM 

5000 CLS 

5005 FOR 1=1 TO 107 

5010 LET L(I) =0 

5020 NEXT I 

5030 PRINT RT 10,7,"RLL ENTRIES 

ERASED" ^^^ 

5999 REM SHi 

PRINT RT 21.. 3; "PRESS RNY KE 

CONTINUE" 

PRUSE 4-0000 

CLS 

RETURN 

REM 

CLS 

PRINT RT 6, 7; "PRESS DESIRED 



6000 
Y "TO 

60-0 
6020 
6030 
6939 
7000 

7010 

FORM* 
7820 PRINT 
7030: PRINT 



RT 8,9; "1. FORM 1040" 
RT 9,9.; "2. SCHEDULE R 



7082 PRUSE 4-0000 
7004. LET K*=INKEY$ 
7088 IF K*<"1" OR K$>' 

T0 ,17000 



THEN GO 



?N 



CLS 

GOSUB 

RCTt 

REM 

PRIf 

LET 

LET 

LET 

LET 

LET 

LET 

LET 

LET 

LET 



URL K**100 4-7000 



Z=0 

P*4 

d (1) *7 

U (2) =21 

«J(3) =37 

J (4.) =4-7 

K (1) =21 

K'C2J =37 

K t>3) =54 
LET K.C4-1 =66 
RETURN 
PRINT RT 
LET 2»6B 
LET P=2 
LET UC1) =1 
LET UC2) =21 
LET K (1J =20 
LET K (2) =4-1 
RETURN 
REM 

LET J=l 

DIM U(4) 

DIM K(4>) 

DIM C$(I0?) 

DIM U<107> 

DIM I*C3) 

FRST 

I=J TO 107 

I*=STR* I 

RT 21,0.; I*, 



"FORM x© 



0,11; "SCHEDULE R" 



9000 REM 

9002 REM 

9004- REM 

9006 REM 

9008 REM 

9010 REM 

9012 REM 

9020 FOR 

9025 LET 

9030 PRINT 

*******" 

904-0 INPUT C*(I) 

9850 NEXT I 

SYNTACTIC SUM 



«-******** 



52866, SK 



VIDEO ARTIST- -8K/2K 

This program shows the ZX81's 
ability to draw pictures under 
BASIC control. Run the program and 
enter the title of your work. Hit 
NEWLINE or ENTER, and you get a 
flashing cursor in the center of 
the screen. This is the editing 
cursor. Control the direction of 
this cursor in real-time with keys 
5-8. The cursor moves in the 
direction of the arrows on the 
keys. In this mode you can move 
anywhere on the screen. 

To start drawing, press 1. 
This puts the computer in plot 
mode. Again, you have real-time 
directional control by pressing 
keys 5-8. To erase, go back to 
edit mode (hit 0) and move the 
cursor over the line to erase. 

When you finish a masterpiece, 
you can save it on tape. Turn on 
your recorder and press S. It 
saves under the title you gave it. 

You can exit just about any 
time by pressing BREAK. This 
program should run in 2K RAM for 
those of you who have modified your 
ZX81's or added a 16K RAM pack. 

Lance Ward, Lansing, MI 



1 
l 
1 
1 



5 
10 
15 
28 
25 
38 
40 
50 

60 

70 

30 

90 

95 

100 

110 

120 

130 

'14-0 

1S0 
160 
170 



LET X=32 

LET Y=20 

PRINT "ENTER TITLE. 

INPUT R* 

CLS 

PLOT X,Y 

UNPLOT X,Y 

IF INKEY*="5" 



IF INKEY*="6" 

IF INKEY$="7" 

IF INKEY$ = "'8" 

IF INKEY$ = "1"" 

GOTO 30 

PLOT X,Y 

IF INKEY*="5" 



THEN 
THEN 
THEN 
THEN 



LET X=X- 

LET Y=Y- 

LET Y=Y + 

LET X=X+ 



THEN GOTO 100 



IF 

IF 

IF 

IF 
IF 



INKEY*="6" 
INKEY$="7" 
INKEY*="8" 



GOTO 
SYNTRCTIC 



INKEY$="0" 
INKEY$="S" 



10© 
SUM: 



THEN 

THEN 

THEN 

THEN 

THEN 
THEN 



LET X=X- 

LET Y=Y- 

LET Y=Y + 

LET X=X+ 



GOTO 
SRUE 



30 
R* 



23487, 8K 



10 



ANOTHER $100 MISUNDERSTANDING 

I just finished rebuilding my 
ZX81 kit. If Sinclair had sent 
complete instructions with my kit 
(delivered in early Jan. 82) I would 
not have needed to reopen the case, 
desolder and remove two components, 
and add seven new ones. I can't 
believe that Sinclair singled me 
out to receive a kit with incom- 
plete instructions, so what follows 
may help others whose ZX81s won't 
work and wonder why they have two 
resistors, two capacitors, two 
little red coils and an oddly 
shaped metal strip left over after 
finishing the assembly per 
instructions. 

Instructions with my kit 
called for only 12 capacitors (Cl- 
C12) to be installed on the board. 
They didn't mention two red-wire 
induction coils. They offered no 
special instructions for installing 
R27 and R29 . And they didn't even 
mention a grounding strip, let 
alone describe how to install- one. 
If the instructions you got are 
similarly lacking, take note. 

Sinclair advises (after I 
wrote) that you install R27 and R29 
vertically. You should find two 
pairs of resistors of the correct 
values (R27=1K, R29=1M) . Use the 
pair that are preformed for verti- 
cal installation. 

You will also find two surplus 
47nF capacitors (marked 473 Z) when 
you finish the assembly per the 
instructions. These are C13 and 
C14. It's easy to spot the board 
location for C13, but the callout 
for C14 is hidden under the 9V 
jack. The C14 location is between 
the end of the jack and the edge of 
the board. 

It is easy to spot the 
locations for inductors II and 12, 
just above the regulator. Plug the 
red-wire coils into these locations 
(II and 12 bring the 9V supply to 
the regulator, without them the 
board is stone-cold dead). Solder 
all these components to the board. 



NOW AVAILABLE 



Keyboard . 
x 'conversions 

• Standard Computer Keyboard 

• Type programs in half the time 

• Minimize errors 

• Wired keyboard hooks up in minutes 

Plans for keyboard conversion with reverse video 
NOW $5.00 

Keyboard with complete parts and plans NOW 155.00 

Wired keyboard, complete with plans NOW 175.00 

Add $5.00 mailing charge tor continental U.S. 
Other locations write for details. 

Mail for information: 

LJ.H. Enterprises 

P.O. Box 6305, Orange, CA 92667 
or call 714/547-8717 



Finally, install the left-over 
weird- looking metal strip so that 
its long bent-up end passes between 
the heat sink and the edge of the 
board, with that end in position to 
contact the top of the case once 
the board is screwed down. Solder 
the other end of the strip to the 
arrow-shaped area just below the 
slot in the board. Then solder the 
other portion of the strip with a 
single small hole in it to the 
rectangular area provided adjacent 
to the regulator. 

My 8K/1K ZX81 ran satisfactor- 
ily with horizontal rather than 
vertical resistors, without the two 
additional capacitors, and without 
the grounding strip. It runs even 
better now with the changes and 
added components. The TV display 
is clearer and more steady and 
seemingly, keyboard entry is faster 
and easier. 



Bob Nadler, Englewood, NJ 



11 




Introducing 
the Sinclair ZX81 

If you're ever going to buy 
a personal computer, now is the 
time to do it. 

The new Sinclair ZX81 is the 
most powerful, yet easy-to-use 
computer ever offered for anywhere 
near-the price: only $149.95* completely 
assembled. 

Don't let the price fool you. The 
ZX81 has just about everything you 
could ask for in a personal computer. 
A breakthrough 
In personal computers 

The ZX81 is a major advance over 
the original Sinclair ZX80-the world's 
largest selling personal computer and 
the first for under $200. 

In fact, the ZX81's new 8K Extended 
BASIC offers features found only on com- 
puters costing two or three times as much. 

Just look at what you get: 

■ Continuous display, including moving 
graphics 

■ Multi-dimensional string and numerical 
arrays 

"Plus shipping and handling. Price includes connectors 
for TV and cassette, AC adaptor, and FREE manual 



■ Mathematical and scientific functions 
accurate to 8 decimal places 

■ Unique one-touch entry of key words 
like PRINT, RUN and LIST 

■ Automatic syntax error detection and 
easy editing 

■ Randomize function useful for both 
games and serious applications 

■ Built-in interface for ZX Printer 

■ 1K of memory expandable to 16K 

The ZX81 is also very convenient 
to use. It hooks up to any television set 
to produce a clear 32-column by 24-line 
display. And you can use a regular 
cassette recorder to store and recall 
programs by name. 



If you already own a ZX80 
The 8K Extended BASIC 
chip used in the ZX81 is available 
as a plug-in replacement for your 
ZX80 for only $39.95, plus shipping 
and handling— complete with new key- 
board overlay and the ZX81 manual. 
So in just a few minutes, with no 
special skills or tools required, you can 
upgrade your ZX80 to have all the 
powerful features of the ZX81. (You'll 
have everything except continuous dis- 
play, but you can still use the PAUSE 
and SCROLL commands to get moving 
graphics.) 

With the 8K BASIC chip, your 
ZX80 will also be equipped to use the 
ZX Printer and Sinclair software. 

Order at no risk" 

We'll give you 10 days to try out 
the ZX81. If you're not completely satis- 
fied, just return it to Sinclair Research 
and we'll give you a full refund. 

And if you have a problem with 
your ZX81, send it to Sinclair Research 
within 90 days and we'll repair or replace 
it at no charge. 

"Does not apply to ZX8I kits 




NEW SOFTWARE:Sinclair has 

published pre-recorded pro- 
grams on cassettes for your 
ZX81, or ZX80 with 8K BASIC. 
We're constantly coming out 
with new programs, so we'll 
send you our latest software 
catalog with your computer. 



ZX PRINTER: The Sinclair ZX 16K MEMORY MODULE: 

Printer will work with your ZX81, Like any powerful, full fledged 



or ZX80 with 8K BASIC. It will 
be available in the near future 
and will cost less than $100. 



computer, the ZX81 is expand- 
able. Sinclair's 16K memory 
module plugs right onto the 
back of your ZX81 (or ZX80. 
with or without 8K BASIC). 
Cost is $99.95, plus shipping 
and handling. 



ZX81 MANUAL: The ZX81 
comes with a comprehensive 
164-page programming guide 
and operating manual de- 
signed for both beginners and 
experienced computer users. 
A S10.95 value, it's yours free 
with the ZX81. 



PARTIAL INDEX, VOL. 1 AND 2 



Vol/Issue/Pg 
Beginners' Columns 

Analyzing the Problem. . 02/07/15 
Computer No. Systems .. .02/02/10 

correction 02/03/02 

02/03/09 
02/04/10 

Dimensioned Arrays 02/07/14 

Error Codes /Debugging. .02/04/11 

FOR-NEXT Loops 01/01/07 

In and Out of ML 02/08/05 

Loading ML Programs 02/08/11 

correction 02/09/02 

Machine Compatibility . .02/01/10 

PEEK, POKE, & CHR$ 02/06/14 

Printing on 8K ROM 02/09/08 

Programming Language 

Terminology 02/06/14 

READ, DATA, RESTORE 02/12/18 

Reading MC Assembly 02/09/12 

REM Revisited 02/11/18 

REM Statements 02/01/10 

ROM/RAM Addresses 02/05/15 

ROM v. RAM 02/02/11 

Subroutines 01/02/11 

User- friendly 

Programs 02/10/13 

Book Reviews 

The BASIC Handbook 02/12/09 

Crash Course in 

Microcomputers 02/10/12 

Problem- Solving Principles 

for Programmers 02/09/14 

The ZX80 Companion 02/07/10 

The ZX81 Companion 02/11/14 

Hardware Projects 

All-Purpose Beeper 02/06/04 

Build Additional RAM. . .02/03/02 

correction 02/09/02 

Input Port 02/08/13 

Interface to World 02/01/07 

(memory -mapped output) 

correction 02/02/02 

Telephone Dialer 02/02/05 

Redesign 02/03/01 

Using Extra Keys on 

Big Keyboard 02/03/07 

Wiring Big Keyboard 01/02/10 



Hardware Reviews 
Burnett Electronics 
Keyboard Beeper.. 



02/06/10 



LJH Enterprises 

Big Keyboards 02/08/04 

SABRE Systems 

Universal Memory Board. 02/12/08 

Machine Language Programs 

Fahrenheit-Celsius 02/06/07 

4K Logical AND & OR 

for 8K ROM 02/07/12 

MC Print Routine--8K. . .02/09/12 

correction 02/10/02 

Syntactic Sum--8K 02/06/13 

Problems and Solutions 

CPU overheating 02/11/12 

Disappearing character .02/10/09 
Escape endless program. 02/02/12 

4K Programs in 8K 02/06/02 

16K RAM hum 02/07/09 

02/09/06 
Tiny keyboard 02/06/11 

Programs --8K ROM 
Miscellaneous 

Digital Clock 02/11/15 

Convergence Pattern. .. .02/12/09 
Games 

Biorhythms 02/01/04 

changes 02/06/13 

correction 02/07/02 

Happy Holidays 02/12/17 

Lights of the City 02/01/12 

Reverse 02/11/17 

Slalom Course. . . .' 02/12/17 

Super Monzxer 02/11/03 

correction 02/12/02 

Educational 

Brownian Motion 02/12/02 

Sine Waves 02/11/02 

correction 02/12/02 

Business Applications 

Check Book 02/07/07 

correction 02/09/02 

Job Review 02/12/06 

Loan Amortization 02/07/06 

changes for IK 02/08/03 

correction 02/08/02 

Gas Hogs 02/09/14 

Utilities 

Print Routine (ML) 02/09/12 

correction 02/10/02 

Roundoff Routine 02/10/15 

correction 02/11/02 

Sort Routine 02/10/15 

Syntactic Sum 02/06/13 



Tips and Hints 
Software 

Bar code input 02/09/06 

Bytes available--4&8K. .02/06/13 

Bytes Remaining--8K 02/12/05 

Debugging programs 02/10/15 

Find clean tape--8K 02/11/13 

Loading Technique- -8K. . 02/12/08 

Memory check 02/04/06 

Save bytes 02/04/06 

SAVE data in arrays 01/01/05 

SAVE/LOAD faster 01/02/11 

Unlis table programs 

8K 02/12/20 

Hardware 

Adding 48K RAM 02/11/12 

Circuit to Reduce 

Interference 02/09/11 

Direct Video 02/09/06 

Hardware Hints 02/11/03 

Hardware Notes 02/04/04 

Installing 8K ROM, 16K 

RAM on MicroAces 02/04/02 

Make-do connectors 01/02/03 

Reverse video 01/02/09 



Soldering Hints 02/08/04 

ZX80 bus pinout 01/02/12 

ZX80/MicroAce Component 

Equivalence 02/10/04 

ZX80 ports Used in 8K. . 02/08/16 
ZX81 2K Upgrade 02/11/07 

Tutorials 

8K ROM Features 02/05/09 

correction 02/06/02 

8K ROM Monitor 

Routines 02/10/10 

8K ROM Potpourri 02/11/07 

correction 02/12/02 

Improved 8K ROM 02/12/04 

Intro to Machine 

Language 02/05/12 

Logical Functions 02/07/11 

ML Multiplication 

and Division 02/06/05 
Random Functions in 4K 

& 8K 02/09/09 

Translating from Other 

BASICS--VAL & LEN 02/09/05 

Writing Game Programs .. 02/07/03 



Do you know-- 

o whether the Crash Course in Microcomputers will help 
you? (SYNTAX 02/10/12) 

o Why NOT to get Problem Solving Principles for BASIC 
Programmers, but buy the "plain vanilla" Problem 
Solving Principles for Programmers instead? 
(SYNTAX 02/09/14) 

o What two simple components you can add to a cable to 
dramatically improve SAVE and LOAD operations with 
ordinary cassette recorders? (SYNTAX 02/09/11) 

o How to make directions appear on the screen when you 
LOAD from tape? (SYNTAX 02/12/08) 

o What BASIC handbook describes Sinclair's unique BASIC 
words? (SYNTAX 02/12/09) 

o How to make your ZX81 keep real time? (SYNTAX 2/11/15) 

o How to easily connect a bigger keyboard to your ZX81? 
(SYNTAX 01/02/10, 02/03/07) 

Subscribers get this kind of helpful, time-saving information 
every month. SYNTAX provides a continuing service--month 
after month, concise, explicit, frustration-preventing 
articles and programs come to you automatically. 



SYNTAX ZX80 is a monthly newsletter exclusively 
for ZX80 and Micro Ace owners. We bring you 
news, reviews and applications for your computer, 
plus technical notes for circuit-builders. SYNTAX 
also provides a forum for thousands of users to 
share advice and problems about programs and 
vendors. We bring you timely updates about new 
hardware, software and books. And we cover all the 
Sinclair-Micro Ace computers, including the new ZX81. 

At SYNTAX we emphasize practicality. You can 
apply our suggestions even if you aren't sure at first 
why they work, because we give you complete instruc- 
tions. Text is clear and easy to understand. SYNTAX 
readers already know about: 

• An automatic phone-dialer they can put to- 
gether in a few hours 

• Syntactic Sums™ to check input for errors 

• Programs to explore computer memory 

• How to build external additional RAM 

• How to add an 8212 I/O chip to control 
external devices from their computers 

And SYNTAX readers like what they get every 
month. Subscribers know they can depend on us. 
After receiving only three issues of 
SYNTAX ZX80, I find that I anxiously 
await the next issue . . . keep up the 
good work! 

Martin Irons 
Goshen, NY 
Congratulations on the brass-tacks, down- 
to-earth approach of your newsletter. I'll 
be looking forward to future issues. 
Otis Imboden 
Washington, DC 
Many readers get their first issue and immediately 
order the back issues — more proof that they like 
what they see. 



You can see what's special about our publication. 
We work hard to bring you a quality newsletter. We 
strive to print useful programsof above-average 
accuracy. As any computer magazine editor can tell 
you, program listing accuracy is tough to achieve, 
but we boost our average with every issue. We test 
each program to make sure it works, it fits in the 
designated RAM, and it runs when you follow the 
directions. We print program listings in screen-image 
format to make it easier for you (it's sure not easier 
for us!) to enter programs accurately. We invented 
Syntactic Sum™ as an additional aid for you in 
getting error-free programs. With your subscription 
you also get access to thousands of other readers, 
and our staff experts are available by phone to 
answer your questions or help you solve problems 
with your machine. 

SYNTAX readers get every month: 

• Latest news of Z80 hardware and software 

• Programs to organize information, calculate, 
entertain, or instruct 

• Do-it-yourself additions 

• Clear explanations for beginners 

To share the benefits of SYNTAX ZX80, just 
indicate your choices on the order coupon and return 
it with your choice of payment in U.S. funds. 
(Please note that additional postage is required for 
delivery outside North America.) 

We are so sure you'll find SYNTAX useful that we 
promise to refund your entire subscription fee if you 
aren't satisfied. An unconditional guarantee — you 
can't lose. 

Join the others who stretch the ZX81s to their 
utmost. Act now — as soon as we receiveyour 
coupon with payment, your first issue will be on its 
way. For faster service, phone your credit card order 
to 617/456-3661. Don't miss SYNTAX! 



%&&> 



RD 2 BOX 457 
HARVARD, MA 01451 



Telephone orders call 
617-456-3661 



PLEASE PLACE IN ENVELOPE AND RETURN TO US 
YES! Please send me 0^6 issues for $17 □ 12 issues for $29 



(Add $7.50 for postage 
ouiside North America 



(Add $15 for postage 
outside North America) 



D My check is enclosed 
Make checks payable to: 
SYNTAX ZX80 INC. 

account number 



□ Please charge my □ MasterCard 
D Diner's Club □ American Express 
□ VISA □ Carte Blanche account 



exp. date, 
signature 
Name 



. bank number (MC only) . 



.Title, 



Organization 
Address 



City 

Day PhoneX 



.State . 



.Zip 



) 



Evening Phone_L 



ZX815S 



I own a □ Sinclair ZX80 
□ Sinclair ZX81 



□ MicroAce computer. 



HOW TO MAKE AND USE AN 8K 
SYNTACTIC SUM TAPE (ZX80, ZX81) 

First, create the utility 
tape. Key in program 2. 

PROGRAM 2 

1 DIM P(31) 

2 FOR L=l TO 31 

3 INPUT P(L) 

4 NEXT L 

5 STOP 

6 LET M=1024 

7 FOR L=M+16352 TO M+16382 

8 POKE L,P(L-M- 16351) 

9 NEXT L 

RUN the program and key in 
the numbers from this decimal 
listing: 



delete lines 1-5. SAVE the rest 
of the program to tape. 

If you use more than IK of 
RAM, use the table to alter these 
instructions and Program 2. 
Always POKE 16388,224 first, 
regardless of mernory size. 



MEM 


POKE 16389 


, M= 


USR() 


IK 


67 


1024 


17376 


2K 


71 


2048 


18400 


4K 


79 


4096 


20448 


16K 


127 


16384 


32736 


xK 


67+4(x-l) 


x*1024 


16352+M 



33 


125 


64 


237 91 


12 64 221 


33 








124 186 


32 8 125 


187 


32 


4 


221 229 


193 201 78 


6 





221 


9 35 


24 236 



When you have typed in the 
final number, error 9/5 appears. 
Get back to the listing (LIST) and 



To use Syntactic Sum with the 

8K ROM and IK RAM, do these steps: 

o POKE 16388,224 and POKE 16389,67 

o Type NEW (NL) 

o LOAD the 8K version of program 2 
from tape 

o Type GOTO 6 (NL) 

o LOAD or key in the BASIC program 
to be summed. 

o Type SHIFT F (NL) to put machine- 
in FAST mode. 

o PRINT USR(17376) 

Syntactic Sum™ Syntax ZX80 Inc. 

and The Harvard Group . 



Syntax ZX80, Inc. hereby grants everyone the right to use the Syntactic Sum 
program, to generate Syntactic Sums™, and to publish them with programs. 
Republishing this program is strictly prohibited without our written consent. 



IF YOU CAN READ THIS, 
IT'S NOT WORKING FOR YOU! 



Fill out the coupon on the reverse and mail it to SYNTAX now. 





< 



Introducing 
the ZX81 kit 

If you really want to 
save money, and you enjoy 
building electronic kits, you 
can order the ZX81 in kit form 
for the incredible price of just 
$99.95* It's the same, full-featured 
computer, only you put it together 
yourself. We'll send complete, easy- 
to-follow instructions on how you can 
assemble your ZX81 in just a few hours. 
All you have to supply is the soldering 

How to order 

Sinclair Research is the world's larg- 
est manufacturer of personal computers. 

The ZX81 represents the latest 
technology in microelectronics, and it 
picks up right where the ZX80 left off. 
Thousands are selling every week. 

We urge you to place your order 
for the new ZX81 today. The sooner you 
order, the sooner you can start enjoying 
your own computer. 

To order, simply call our toll free 
number, and use your MasterCard or VISA. 

To order by mail, please use the 
ooupon. And send your check or money 
order. We regret that we cannot accept 
purchase orders or C.O.DIs. 

CALL 800-543-3000. Ask for op- 
erator #509. In Ohio call 800-582-1364. 
In Canada call 513-729-4300. Ask for 
operator #509. Phones open 24 hours 
a day, 7 days a week. Have your Master- 
Card or VISA ready. 

These numbers are for orders 
only. For information, you must write to 
Sinclair Research Ltd., 2 Sinclair Plaza, 
Nashua, NH 03061. 

sinczlaii - 



AD CODE \iJ3SX 



PRICEt QTY. AMOUNT 



ZX81 



ZX81 Kit 



8K BASIC chip (for ZX80) 



Memory Module (for ZX81 or ZX80) 



Shipping and Handling 



$149.95 



9995 



39.95 



9995 



4.95 



TOTAL 



$4.95 



MAIL TO: Sinclair Research Ltd., One Sinclair Plaza, Nashua, NH 03061 

NAME 

ADDRESS 



CITY/STATE/ZIP_ 

t U.S. Dollars 



DEAR EDITOR: 



Here's a better way to stop 
the listing and editing of an 8K 
program. Make the first line of 
your program 1 REM X. After typing 
in your program, enter with no line 
number POKE 16514,118 and POKE 
16509,40. This will stop the list- 
ing. When you try EDIT or LIST, it 
gives you A241 REM no matter where 
the program cursor is . 

To get out of this mode, POKE 
16509,0 and POKE 16514,61. 

Andrew Lederman, Pitts ford, NY 

In the Feb. 82 issue, George 
Luhrs asked for a linear regression 
program. We have one for 8K ROM/ 
IK RAM or more for $2.50. It puts 
the best line through x,y data 
points. Ask about our business 
Linear Programming system. 

If you're strung for bytes, 
use LET A=0 and LET A=A+1 instead 
of DIM A(l) and LET A(1)=A(1)+1 for 
the sum-to-memory and counter 
method I described in Feb. 82. 

Paul Ezra, Ezra Group II, Box 5222, 
San Diego, CA, 92105, 714/584-8291 

In spite of Gary Vincent's 
authoritarian tone in his Feb. 82 
letter about painting heat sinks, I 
believe he is incorrect. 

Copies of applicable sections 
of the Motorola and National Volt- 
age Regulator Handbooks are 
enclosed to document the positive 
effects of painting aluminum heat 
sinks black. The effect of 
increased emissivity varies with 
the heat sink's parameters but 
black paint always helps! 

Chuck Hut ton, Atlanta, GA 

Chuck included tables from the 
Handbooks showing emissivity values 
for various surfaces . Painted or 
varnished surfaces have higher 
emissivities than polished or 
oxidized surfaces . --AZ 



I'd like to hear from anyone 
interested in putting FORTH on the 
ZX80/81 or in defining a "standard" 
mapping between the ASCII and ZX81 
character sets. 

Rich Holmes, 1303 E. Wilson #204, 
Batavia, IL, 60510 

I bought an 8K ROM and 16K RAM 
module for my ZX80. Here are some 
problems I found and my solutions : 

1. The ZX81 keyboard overlay 
won't lay flat and bows up in the 
center when attached. Apply double 
sticky tape and press it onto the 
existing keyboard. It lays flat 
and keyboard sensitivity is 
unchanged. 

2. The 16K RAM fits loosely, as 
it's only attached by the edge 
connector. If it comes loose with 
power on, the RAM may be damaged. 
Fit a 2"x5" piece of thin PC board 
material between the RAM foot, pads, 
through the edge connector slot in 
the ZX80 case (I whittled mine out 
a little with a pen knife) and 
under the ZX80 PC board. Attach it 
to the RAM and to the bottom half 
of the ZX80 case with short, self- 
tapping screws. Reconnect the 
internal gournd spring (supplies 
ground from the PC board to the 
lower case coating) elsewhere. 

3. The 16K RAM internal ribbon 
connector leads were not clipped 
during assembly at the factory. So 
the leads intermittently contact 
the conductive coating inside the 
case. As the coating has ground 
applied, the consequences are 
disastrous. Clip the leads. 

Larry Lockwood, Yorba Linda, CA 

Is anyone selling the MicroAce 
Flicker-Free kit for upgraded ZX80s 
and MicroAces stateside? 

I got two surplus keyboards 
from John J. Meshna Inc. A fantas- 
tic buy for $20 each. On my 4K/16K 
system I mounted the computer (out 
of its case) , 16K RAM and power 
supply in the keyboard. I removed 



14 



the cassette ports and remounted 
them at the back of the keyboard 
housing. I used the keyboard's 4 
red keycaps for cursor functions , 
10 black keycaps for numerics , and 
the remaining keys for standard 
alpha functions and separate tokens 
(such as TO, THEN, AND). I used 
the circuitry mentioned in SYNTAX 
(Vol.1 No. 2) for the use of the 
extra keys without holding the 
SHIFT down. This keyboard was 
fairly easy to wire following the 
instructions in SYNTAX and 
Sinclair's schematic. 

On my second system I wired 
the new keyboard to an externally 
accessable plug. I tapped off 
necessary connections on the ZX80 
(8K/16K) and mounted its plug at 
the top of the case where my modu- 
lator used to be (I removed the 
modulator after I ran direct video 
out) . This way I have portability 
or big keyboard features depending 
on where I'm computing. 

Key caps on both keyboards 
were made from photocopied origin- 
als. Elmers glue holds them down. 
Spread a little extra on the tops 
to protect them from wear (it dries 
clear) . 

The keyboard also has a myriad 
of other helpful hardware such as a 
speaker with volume control, four 
switches (I used one for power and 
one for video select) and a number 
of small lights. All in all, a 
very worthwhile investment. 

Russ Gagnon, Oscoda, MI 

I don't know of anyone in the US 
selling the MicroAce board now. 
For info about Meshna's keyboard 
(#SPL-19), contact Doug Meshna, PO 
Box 62, E. Lynn, MA, 01904, 617/ 
595-2275. --AZ 

Jan. 82 p. 9 "More Hardware 
Hints" contains a number of useful 
hints, but you might find Cramolin 
better for cleaning and preserving 
metal-metal contacts . Old Colony 
Sound Labs, Audio Amateur, Box 243, 



Peterborough, NH 03458, sells both 
Cramolin cleaner and preservative 
for $9.95 (there are other 
sources). I would clean and 
protect the board edge contact of 
any ZX80/1 sent to me with return 
postage and $2.00. 

Ron Miller, 3488 Douglas Drive, 
Murraysville, PA, 15668 

USERS' GROUPS 

We have received notice of these 
users 's groups since last month. 
To check for a group in your area, 
call or drop us a note with a SASE. 
If you belong to or want to start a 
ZX80/81 users' group, let us know 
and we'll pass it on.--AZ 

Los Angeles, CA: George Kuby , 
213/550-5035 after noon or P.O. Box 
34545, Los Angeles, CA, 90034. 

San Francisco/San Jose, CA: Paul 
Perrault, Stanford Telecommunica- 
tions Inc. , 1195 Bordeaux Dr. , 
Sunnyvale, CA 94086, 408/734-5300 
x267. 

Seattle/Tacoma/Everett , WA: Dan 
Gallery, 1619 E. John St., #414, 
Seattle, WA 98112, 206/325-8186. 

Denver, CO: Cap Hamilton, 767 S. 
Gaylord St., Denver, CO 80209, 
733-6857. 

Fort Wayne, IN: Sinclair Midwest 
Users' Group, Robert Carroll, P.O. 
Box 13042, Fort Wayne, IN 46866. 

Lynchburg, VA: Lynchburg Microcom- 
puters Users Group, Lane Lester, 
804/237-5961 Div. of Natural 
Science. 

Central Pennsylvania: Bill 
Russell, RD 1 Box 539, Centre Hall, 
PA 16828, 814/364-1325. 

New York, NY: ZX Users' Group of 
New York, Box 560 Wall St., New 
York, NY 10005. 



15 




COMPUTER CHESS — JUST $24.95 

ZX81 CHESS: a challenging game written 
in superfast machine code for the 
SINCLAIR ZX81 (req . 16K rampak) 



Improve your game: Choose from six levels of play, novice to expert. The 
ZX8 1 gives a graphic display of board position and keeps separate records of 
your moves and the computer's. Make any legal move, including Castling 
and Enpassant; illegal moves not accepted. 

Refine your strategy: Set up board to any configuration, even change sides 
midgame. Elect "Random Mode" — computer won't always make the same 
move in identical situations. Another bonus: a chess clock that records and 
displays time per move. 

To purchase your ZX81 CHESS package, send check or money order 
(postpaid, but add sales tax in Mass.) to: >g\ 

'MINDWARECO. 

70 Boston Post Road 
Wayland, MA 01778 



HARDWARE REVIEW 



Product : 
From: 



Price 



4K/8K ROM Switch 
Marex Electronics, 2805 
Abbeyville Rd. , Valley 
City, OH 44280 
basic kit, $24.95, 
assembled, $30.95; full- 
feature kit, $34.95, 
assembled, $49.95 



The Marex ROM switch lets you 
use both your 4K and 8K ROMs on a 
ZX80 (a 4K ROM won't work on a 
ZX81) . The basic kit comes with a 
3" square PC board with plated- 
through holes, sockets and compon- 
ents, plus spacers and screws to 
put the case back together with the 
PC board inside. An extra $10 gets 
you the full- feature kit, which 
also gives cassette-load automatic 
gain control, a keyboard beeper and 
a reset-upon-ROM- switch so you 
don't have to pull the plug every 
time you switch ROMs. For kit 
assembly, you need wire cutters, a 



soldering iron, small screwdriver 
and pliers, drill and pen knife. 

I put together the basic kit. 
It came with step-by-step direc- 
tions, parts list, schematic and 
board layout drawing showing where 
everything goes. All the parts 
arrived, including about a foot of 
solder. Although not a hardware 
person, I had no trouble soldering 
the components to the board and 
plugging it into the computer. 

But I did have trouble getting 
it to work. First, the directions, 
though very clear and simple, don't 
tell you how to avoid zapping your 
ROMs with static electricity. Not 
a big problem here at SYNTAX, where 
ROMs abound, but if you have only 
2, it could be tough. Then we 
found a short between 2 ROM pins on 
the PC board. Rex Rickly of Marex 
tells us he caught this fault in 
one other board, and no one else 
has gotten one. It seems that some 
plated holes are too large, so the 
traces sometimes run too close, 
causing shorts. 

Rex sent an assembled, tested 
board, and it works quite nicely. 
One of our ZX80s , which always 
resets slowly (several seconds with 
IK RAM) , would not work with the 
ROM switch board. But this machine 
only works marginally as it is. 

If your luck runs better than 
mine and you get a good board, keep 
these things in mind: ground your- 
self when handling ROMs . When 
removing a ROM from the ZX80 , touch 
the modulator (silver box in the 
rear) . When you plug the ROMs into 
the new board, push them all the 
way in (till the pins pop into 
place) to make good .contact . Yet 
be careful not to bend the pins-- 
they might snap. Three capacitors 
on the ZX80 board will get in the 
way--bend these down carefully 
until the ROM socket pins can plug 
into the socket on the ZX80 board. 
With these precautions and a good 
PC board, you'll be able to use 
either ROM without removing one 
each time, risking broken pins.--AZ 



16 



THE FLAGS REGISTER 

(This is part 3 of 12 short pieces 
on machine code programming on the 
ZX80/1--AZ) 

The Flags register, F, is the 
other half of the Accumulator pair, 
AF. The Accumulator (or A regis- 
ter) is where the results of 
operations (like add and subtract) 
are stored. The Flags register 
tells you something about the value 
in the A register. AF is just like 
the other register pairs HL, BC, 
DE, etc. , except that the AF pair 
changes with each manipulation; all 
of the others change only when 
specifically instructed to do so. 

Instead of values for each bit 
position, the Flags register holds 
information for testing. Each bit 
stands for a different condition 
and can be either or 1 (0=flag 
not set, l=flag set). Each bit 
represents the information: 



FLAGS (F) 

S Z 
(bit) 







H - P/0 N C 





ACCUMULATOR (A) 

128 64 32 16 8 4 2 1 
(bit) 0000 

Bit 7--S sign (0 if +, 1 if -) 

6--Z zero (0 if result of oper- 
ation WAS NOT 0, 1 if result 
WAS 0) 

5--not used 

4--H half carry (used intern- 
ally, not testable) 

3--not used 

2--P/0 parity/overflow (parity 
is testable) 

1--N add or subtract (used 
internally, not testable) 

0--C carry (1 is a carry from 
the Accumulator) 

Most nonprofessional machine 
code programmers need thoroughly 
understand only the Z flag. The 
others can be studied when neces- 
sary. For instance, if you have an 



address in REM for data (<128; + or 
- value) , you can load A with that 
value, test bit 7 (the Z flag) to 
see if it is positive or negative, 
then continue depending on what is 
in the Z bit. 

Here's what happens: when bit 
7 is tested, the Z flag will show 
if the bit is 1 (negative value) or 
1 if the bit is (positive value) . 
It sounds confusing, but just 
remember in the Z flag means 
negative; 1 means positive. If the 
next instruction is JR Z (jump 
relative to Z) , then the computer 
will jump if Z=l (similar to 
IF... THEN GOTO in BASIC). If Z=0 , 
the computer just goes to the next 
instruction. 

The Z80 offers thousands of 
possible bit- test /test-and-branch 
combinations ... try a few. 

Next: LOADING REGISTERS WITH DATA 

Jon Bobst, Zeta Software, PO Box 
3522, Greenville, SC, 29608-3522 



BANI-TECH 

Software of the Month Club 

Get the most from your ZX81 with 16K, use it to 
its full potential, while building an impressive in- 
ventory of software. Receive twelve listed programs- 
one a month. Programs like Income Tax Recording, 
Auto Maintenance, Household Expenses, Price of 
Gold Forecasting, Diet Planning, Scrooge's Christmas 
Gift and Card List and many, many more for the 
incredibly low price of just $19.95 per year. Save 
your valuable time and get down to basics! 

Make checks payable to BANI-TECH 
P.O. Box 1568 
Princeton, N.J. 08540 

D My check for $19.95 is enclosed. 
Please charge my D Mastercard D Visa 



Account Number . 



ixp. 



Signature . 



Name. 



Address . 
City 



.State. 



.Zip. 



17 



SYNCH RO-SETTE 

FORTHEZX-80&ZX-81 

8KROM1K-16K 

CAMES-EDUCATIONAL-BUSINESS 

GRAPH ICS-TUTORIAL-ETC. 



24 HR HOTUNE - tt»S«S*t3M 

IN OHIO -•0*582-1**. 
Ask for operator No. J83 



12 monthly issues- 6 bwnontMy 
cassettes containing at least 6 ptopamfMefc 

2E $39.50 



ILL Residents add $2.07 tax 

ouaKtysAaddtiaoo 

SlfSCO. 
3m West lake Street » . ^ ia » , ML, W«1 

(312)628-8955 



- i 



SOFTWARE REVIEW 



Programs : 
Price: 



ROM/ RAM: 
From: V-P- 
Stono Lane, 
West Mldlan 
CC--Mindwar 
Rd. , Way Ian 
Silicon Tri 



Video-Plan, 
Computacalc 
V-P£9.95 deluxe, 
£7.95 standard 
CC $39.95 US 
8K/16K, ZX81 only 
-Video Software Ltd. 

Kinver, Stourbridge, 
ds, UK DY7 6EQ 
e Co. , 70 Bos ton Post 
d, MA 01778 (written by 
cks , London) 



Electronic spread sheets (like 
Visi-Calc) let you analyze or model 
business and financial problems 
quickly and easily. You can try 
changes, make corrections, and play 
with alternatives. Any task using 
rows/columns of numbers you can 
carry out with these two programs. 

Computacalc and Video-Plan run 
on ZX81s with 16K RAM. Neither 
runs on upgraded ZX80s . Both are 
written in BASIC, run slowly, can 



be LISTed, work with ZX printers, 
have mostly OK input error trapping 
and recovery, left- justify entries 
(decimal points do not line up) , 
and let you force recomputation. 

Neither program lets you move 
rows or columns automatically, nor 
can you insert rows or columns. As 
a user, I miss these functions. As 
a rotten typist, I also miss the 
ability to edit complex formulas. 

Each program emphasizes a 
different approach to analysis--CC 
is cell-oriented, V-P is column- 
oriented. 

Documentation for each program 
is poor. The notion persists among 
software suppliers that one manual 
can serve to sell, instruct, exem- 
plify, explain, and catalog. Once 
you learn to use the program, you 
will find looking through the 
examples just to find a command 
annoying. Of the two, V-P did the 
better job. 

CC's manual fits in the 
cassette case--4 1/2 columns of 
type set 13 lines to the inch. You 
get an example that demonstrates 
most commands, a list of options to 
respond to the major prompt, and 
two hints to modify the program. 

V-P uses larger type and 
provides a 19-page booklet that 
covers similar topics. Three pages 
describe suggested applications, 
and three are devoted to titles and 
contents. Each menu option is 
fully described by telling the 
consequences of each permissible 
response. Chapter 5 on functions 
lacks clarity and does not explain 
which columns may have subtotals. 

In most cases the effect of 
erroneous entries is explained. 
Both programs can behave badly 
without warning the .user, though CC 
exhibited fewer of these problems. 
Any long tape can load with a few 
errors which may cause the program 
to crash after a while. That's a 
needless annoyance- -run the 
Syntactic Sum of these programs 
when you first get them and at 
every load thereafter. 



18 



V-P exhibited defects so 
serious that I must rate it 
unacceptable until they are cleared 
up. You can print a table with 
data and titles misaligned; sub- 
totals can be arithmetically 
incorrect; and you can confuse the 
program so that the spread sheet 
calculates subtotals at intervals 
other than those you asked it to. 
All of these occur without warning. 

CC can give the usual least- 
signicant- digit error between row 
and column totals, resulting from 
round-off error. 

Both programs provide huge 
grids, much to their detriment. 
Neither gives you any direct con- 
trol over grid size, and both 
calculate the whole grid every 
time. V-P took about 10 minutes to 
retotal the sheet after changes-- 
most annoying. CC is much faster 
when you use small portions of the 
sheet since it only calculates 
formulas you put in, whereas V-P 
always does all row functions and 
column totals--nice, but slow. 

V-P only allows functions 
between columns, but displays the 
function below the column at all 
times. In CC, you define cell 
relationships freely, but you'll 
never see them again unless you 
write them down. The function 
labels just serially number the 
formulas you put in. 

V-P handles titles separately 
from data, so they don't scroll off 
the screen, but V-P doesn't move 
the row titles and data together as 
it does the column labels. CC 
treats the labels as data, and 
scrolls them off screen on large 
grids. Neither program provides a 
title lock, nor does either let you 
adjust the row title size 
independent of the data block. 

Despite the shortcomings , I am 
delighted to see programs of this 
type becoming available for the 
ZX81. Computacalc is a usable 
program and both are recommended 
for programmers who want to see how 
to do these functions in BASIC. --K0 



KOPAK GIVES 


YOU THE POWER! 


! KOPAKS'M Touch-A-Matlc gives you 


KOPAKTM is now offering The Source* 


\ the power lo type more accurately and 


'America's Information Utility'. The 


! much taster. No wires, no soldering. 


Source* gives you the power to access 


simple to install . Our unique vinyl over- 


a wide array ol services including: 


1 lay guides your lingers to the correct 


• Barter • Shopping • Business Infor- 


i keys Touch typing now possible with 


mation • Career Network • Electronic j 


your Sinclair* or MicroAce*! 


Mail • Medical Advice • UPI News 


i $9.95 


Service and much more. A modem is i 




required to use The Source*. 


The KOPAKTM Sinclair* female Con- 


Source ID S100. 


nector gives you the power to use the 




1 Z -80 bus. Edgecard connectors specif- 


More POWER on the way! KOPAK'STM 


ically made for Sinclair* computers. 


Coming Creations: 


| • 46 Pins, 23/23* All pins are gold 


The KOPAKTM RS-232 Interlace 


| plated • polarizing pin lor correct 


The KOPAKTM Bus 


alignment everySme! Available with 


The KOPAMATICTM Keyboard 


Solder-Tail. Wire-Rap and PCBoard. 


The KOPAKTM Printer 


$14.95 


KOPAKTM Memory Products 1 




The KOPAKTM Disc 


KOPAK has Nil POWER to Mhwt' 






© 1982 KOPAK Creations Inc j 


KOPAK Creations Inc. 


TM Trademark ot KOPAK Creations Inc 


Dipt. SX 


Sinclair* is a trademark ot Sinclair* 


! 448 Wis 1 55th Strut 


Research LTD 


Nil York NT 10019 


MicroAce" is a trademark ol MicroAce* 


! (212) 757-8698 





8K FLASHING PROMPTS SUBROUTINE 

To avoid screen flicker, I 
came up with this subroutine (at 
200 in this example) . The example 
program gives 6 flashing prompts. 
To change the number of flashes , 
change 6 in line 145. For differ- 
ent periods between flashes , change 
3 in line 215. Run in SLOW mode. 

Rois Harder, N. Van, B.C., Canada 



100 PRINT RT 21,6; "C0 TO ID" 

10S PRINT RT 21,0; "INPUT" 

110 LET P=0 

115 GOSUB 200 

120 PRINT RT 21,0; "1 

125 GOSUB 200 

130 PRINT RT 21,0; "INPUT" 

135 GOSUB 200 

14-0 LET P=P + 1 

14-5 IF P=6 THEN GOTO 155 

150 GOTO 120 

155 INPUT R$ 

200 LET T=0 

205 LET T=T+1 

210 IF T=3 THEN RETURN 

215 GOTO 205 
SYNTRCTIC SUH: 19157, BK 



19 



INCREDIBLE! 

ZXBO/1 Users 

RKe-16 Expanded Memory - 16K 79.95 

RKL-32 Expanded Memory - 32 K 149.95 

RKL-J1' Single Joystick System 69.95 

RKL-J2'Dual Joystick System 89.95 

30-Day Money Rack Guarantee 

fully Assembled and lesled 

• Includes Demonstration Program 

SUPER PACKAGES! 



Super RKL-A 

32/C Memory plus 
Single Joystick System 



199.95 



Super RKL-B 

32/C Memory plus 
Dual Joystick System 



219.95 



RKL Systems 



Include A SG/shfpngi liaixlling 
Check or money orda 



POBat 515 

h-ominstei MA 01453 



CURING 16K RAM RANDOM DUMPING 

My 16K RAM pack tended to dump 
its memory if my ZX81 was moved, 
wiggled, or tapped, or if the RAM 
pack was squeezed. Sometimes it 
dumped for no apparent reason. I 
suspected the problem was caused by 
dirty contacts at the edge connec- 
tor, but cleaning the contacts had 
no effect. The cause was mechani- 
cal instability in the RAM pack 
itself. The problem took only five 
minutes to fix, and now my ZX81 
with 16K attached can withstand any 
amount of wiggling, shaking or 
thumping without a memory dump. 
This procedure worked for me: 

• Open the RAM pack case by remov- 
ing the 4 screws and pulling the 
halves apart gently. Inside are 2 
boards hinged together at the top 
by a ribbon cable, book-fashion. 

• Inside the front and rear halves 
of the case you'll find large tan- 
colored cardboard insulators. With 
a pair of scissors, trim the 



BOOK REVIEW 



Title: 



By: 
Price : 



Machine Language Program- 
ming Made Simple for Your 
Sinclair ZX80 and ZX81 
Melbourne House Publishers 
$19.95, 160 pgs, paperback 



I wanted to review this book 
because I'm the person it was 
written for. The ZX80 and ZX81 
have been my only computers. I 
taught myself BASIC and can now do 
most of the things I want to with 
it. I felt that machine language 
(ML) would be a good addition to 
speed up some programs and improve 
display. The idea of ML "made 
simple" appealed to me. 

This quality spiral-bound 
volume starts on a very elementary 
level, explaining how the computer 
counts and stores numbers. It goes 
through the various registers for 
both the ZX80 and ZX81. You learn 
to manipulate the registers and 
keep track of them. 

Each ML command is explained 
with exercises as learning aids. 
At the end two fine indexes list 
the Z80 commands both by number and 
alphabetically by mnemonic code. 
All instructions are in hexidecimal 

notches in the insulators so they 
just clear the screw posts. 

• On a lower corner of the front 
board (the one with the blue plug 
attached) you will note 2 grounding 
springs that are designed to make 
contact with the metallized coating 
of the case when it is assembled. 
Inspect this area of the board to 
see if the pins running from the 
blue plug project far enough above 
the rear of the board to make 
contact with the grounding springs 
when they are flexed. If this 
appears possible, nip off the 
projecting pin ends as close as 
possible to the surface of the 
board and cover them with a piece 
of vinyl electrical tape. 

• On the boards in my unit, only 2 
of the electrolytic capacitor cans 



20 



numbers, not decimal. Most 
articles I've seen are in decimals. 

Being uninitiated to ML, my 
main problem was: what do you do 
with it? I felt like I learned all 
the skills of woodworking but not 
to build anything. A program com- 
bining BASIC and ML is included at 
the end, but I found it hard to 
follow and felt it lacked suffici- 
ent explanation to make it useful. 

Don't order this book for 
quick ML routines to plug into your 
programs. Instead, you'll find a 
book that seems to give a good 
background in ML to help you under- • 
stand and build on further informa- 
tion found in other articles. 

Michael Roberts, Des Moines, IA 

This book doesn' t offer immediate 
applications, but it's the best 
explanation of ML for ML beginners 
I've seen. Its friendly style is 
painless reading and simple analo- 
gies help make this language clear. 
This introduction is a must before 
moving to books like Zak's Program- 
ming the Z80. From from Gladstone 
Electronics, 901 Fuhrmann Blvd., 
Buffalo, NY, 14203, or 1736 Avenue 
Rd. , Toronto, Ontario, M5M 3Y7.--AZ 

had vinyl electrical tape on top of 
the cans to prevent shorting to the 
opposing board when the boards were 
folded together. Place vinyl tape 
on top of ALL the cans , and as an 
extra precaution stick a strip of 
tape on the bottom surface of the 
opposing board. 

• Reassemble the RAM pack, making 
sure that the lower grounding 
spring on the front board makes 
contact with the metallized coating 
on the inside of the of rear half 
of the case. If necessary, bend it 
gently to insure that it makes 
proper contact. The side grounding 
spring will be pinched between the 
two halves of the case when it is 
properly assembled. 

Burt Haberman, Tuscon, AZ 



CLASSIFIED ADS 



Reach 19,000 ZX80 and ZX81 users 
for $2. 75/ line, 4- line min. Send 
ad, typed 35 char/ line, with check/ 
credit card no. by 15th of month 
for next month's issue to SYNTAX, 
RD 2 Box 457, Harvard, MA 01451. 

Coming soon - ZX81 Monopoly 
16K RAM-up to 6 players-imported 
from the UK. British board version 
family game. Savage PO Box 2681 
Kirkland, Washington. 98033 

7 IK ZX81 GAMES ON CASSETTE- -$ 10 . 00 
Mastermind, Slot Machine, Craps, 
Sub Rescue, White Hot Number, and 
more. NEW ENGLAND SOFTWARE , Box 691, 
Hyannis, MA 02601. (Also for ZX80) 

Get loaded every time on ZX-80/81 
with LED monitor. Plans $1; Kit 
$6+ $1 ship. Play basketball (2 
sep. games avail.) in 4K/1K & 
8K/2K, $1.50 per list. Send money 
+ SASE to: R&H Enterprises, 1408 N. 
4th Ave. E., Newcon, IA 50208 



21 



Available from SYNTAX . . . 

For computing beginners — 

Crash Course in Microcomputers $17.50 

Covers hardware, machine language and 
applications. Reviewed in SYNTAX, Oct. 1981. 
Add $1.50 shipping. 

ZX80 Pocket Book $14.95 

Includes ZX81 supplement. Covers Sinclair 
BASIC, data and program listings. 
Add $1.50 postage. 

For advanced hardware/so/tware users — 
Zilog's Z80-Z80A CPU 
Technical Manual $7.50 

Zilog's Assembly Language 

Programming Manual $15.00 

Add 5% for shipping. 

4K ROM Listing with Sinclair's Original 
Designer's Annotations $40.00 

Original listing plus utility programs. 

SYNTAX back issues available, $4 each. 
Call or write for our group subscription discounts. 

SYNTAX • RD 2 Box 457 • Harvard, MA 01451 
617 / 456-3661 



SIMULATED LEARNING for your ZX81/0! 
Think of animal; computer tries to 
guess it. Computer learns from mis- 
takes for next time. List, instr., 
cassette (good stuff! 8/16K)$12 . 50. 
Foreign add US$3. SMUG PROJECT, PO 
Box 13042, Fort Wayne, IN 46866 

FOR SALE :ZX- 81.16K RAM, Radio Shack 
Minnisette recorder, cables .manuals 
$225.00. Also ZX-80.8K ROM, cables, 
manuals, $100.00. Send cashiers ck 
or M.O. : V. R. Haupin, Hydrostorage , 
Confederate Dr, Franklin TN 37064. 

OFFICIAL SHOW GUIDE for 2nd ZX 
Microfair held Jan. 30 1982--46 
pages, listing all major suppliers 
of ZX81 software and peripherals-- 
$2.49 each. 

ANIMATED GRAPHICS SUBROUTINE--very 
clear, well written primer on how 
to do graphics on the ZX81. 
Includes demo program, listings and 
subroutines-- $2. 95 each. Send 
check or m.o. to Mindware Co. , 70 
Boston Post Rd. , Wayland, MA 01778 

WANTED: ZX-80, 8K ROM, IK RAM and 
all paraphernalia that came with 
the machine upon original purchase, 
especially programmers manual. 
State sales offer in writing, 
including telephone number, and 
mail to: Michael Wido 

2922 Kendale, Apt. 142 
Dallas, TX 75220 

BANTA SOFTWARE now offers Football, 
Murder in the RAM, Casino, & our ori- 
ginal-Super Monzxer- taped for $3.95 
each. Also, we will write programs to 
your specs for reasonable $$. BANTA 
SOFTWARE, RD #7 , Bethlehem, PA 18015 

TAX RETURN HELPER: A set of ZX81 
(16K RAM) programs let you easily 
enter/examine/modify the forms and 
immediately compute the results of 
any change. You can also save the 
data for future use. Form 1040 and 
Sched A,B,C $10 (tax deductible). 
Same plus Sched D,E $14. KSOFT, 845 
Wellner, Naperville, IL 60540. 



Coming Soon - CP Productions. We 
will have everything from Adventure 
Games to Chess, Cooking, to SAT 
Vocabulary and Space Games to 
Checking Account Balancing. Send 
for a free list of coming programs. 
CP Productions, P.O. Box 247, Big 
Horn, Wyoming, 82833. 

ZX81/16K OUICK CUBE- -guaranteed to 
solve any 7 Rubik's Cube (TM) or_ 
triple your money back. Cube is 
set up by entering 54 color faces 
of cube. Cube is then solved via 
150-200 rotations. Pause control 
available at each cube rotation 
display. Very interesting program. 
Also available for TRS-80 (TM) 
I/III, 16K, Level II BASIC. Send 
$19.95 for either program, plus 
$1.50 postage and handling, to 
Alpha Queue Systems, Dept. D, P.O. 
Box 20885, Dallas, Texas 75220. 
Texas residents add 5% ($1) state 
sales tax. Remit checks or money 
orders only please. TM- -registered 
trademarks of Ideal Toy Company and 
Radio Shack. 

"Coin Collection"Mass data storage. 
Menu: add/ delete, check inventory, 
change cost/value, total cost/value, 
search, self running/ saving & more. 
(Listable)8K R0M/16K RAM. Tape+Inst . 
$9. 95+$l. 05P/H. Programs custom/made 
Send a SASE with descript ., example, 
and title for free est. M.C.Hoffman 
542 Clinton Rd, Paramus , N.J. 07652 

16K GAMES FOR THE ZX81/ZX80 8K ROM 
ZX8 TREK - 5 levels of difficulty 

with 20 battle command options. 
CRIBBAGE - the computer challenges 

you at the game of Cribbage. 
TANK BATTLE - find the computer's 

tank before it locates yours. 
Cassette + manual - $14.95 ea. game 
A.Nisbet, 6 Moffat Court, Rexdale, 
Ontario, Canada, M9V 4E1. 

#6116 2K x 8 150 NS Static Ram Chip 
Available for delivery @ $19.00 
plus $1.00 for shipping. Send 
check or MO to: Support Systems 
One, PO Box 1794, Phila. , PA 19105 



22 



MAGIC SQUARE. World's Most Magic!! J 
16x16 More Magic thn BEN FRANKLIN' s 
Probe with ZX. $2.00 EZRA GROUP II 
Box 5222 San Diego, California 92105 

LATEST SOFTWARE FOR ZX81 - Games, 
practical, math and more! Lowest 
Prices Anywhere! Also, Loading 
Filter plus other accessories. 
Write for FREE catalog to: 
GREAT LAKES SOFTWARE, 201 Burlington 
Road, Valparaiso, IN 46383 



OUR POLICY ON CONTRIBUTED MATERIAL 

SYNTAX ZX80 invites you 10 express opinions related to the ZX80 and the 
newsletter. We will print, as space allows, letters discussing items of general interest. 
Of course, we reserve the right to edit letters to a suitable length and to refuse 
publication of any material. 

We welcome program listings for all levels of expertise. Programs can be for 
any fun or useful purpose. We will test run each one before publishing it, but we 
will not debug programs; please send only workable listings. 

In return for your listing, we will pay you a token fee of S2.00 per program we 
use. This payment gives us the nonexclusive right to use that program in any form, 
world-wide. This means you can still use it, sell it, or give it away, and so can we. 

We will consider submissions of news and hardware or software reviews. Please 
keep articles short (35<WOO words). Again, we reserve the right to edit accepted 
articles to a suitable length. We will pay 7 cents per 6 characters, including spaces 
and punctuation, for accepted articles. 

When you send in programs for possible publication in SYNTAX, please 
include the following information: 

• How to operate the program, including what to input if it does not contain 
prompts. 

• Whether you can run the program over again and how. 

• How to exit the program. 

• The Syntactic Sum (using the Syntactic Sum program in the February, 1981, 
issue). 

• Whether it fits in IK or 2K RAM (or I6K when available). 

• Whether it uses the 4K or 8K ROM. 

We pay for this explanatory text at the same rate as for articles in addition to 
payment for the program itself. 

If you want us to return your original program listing or article, please include 
a self-addressed, stamped envelope. Otherwise, we cannot return submitted material. 



****L00KING FOR SOMETHING DIFFERENT 
*tO run on your Z81? How about some 
*thing that lets you investigate 
•'your past lif e , . . . or , f ind out just 
"what turns on that special person. 
*How? 'Astrology ' --based on ancient 
^knowledge about the harmonic quan- 
*tazation of energy -Astrology does 
''•"work! And now, you can write a pro- 
fessional personal horoscope . Check 
"mate compatability , analyse person- 
alities . Not only locates 9 planets 
■'moon, node, houses , but prints out an 
"interpretive analysis , -making it a 
"great party game. Tape $16.Visa/MC. 
'•914-2555521. LS.POB 935, New Paltz, 
-NY. 12561. Astrology trainer incll6K 

LAND THE SPACE SHUTTLE. Your TV 
screen becomes the instrument panel 
and windshield of the spacecraft. 
The runway appears before you, 
giving the effect of a flight simu- 
lator. Game has several endings, 
each dependent upon your skill. 
LAND/ AIR BATTLE. Destroy the enemy 
(the computer) before it destroys 
you. Fly the aircraft through flak 
dropping bombs on target. For ZX81 
and slow screen Microace 8K Rom.l6K 
Ram. Get both games on one tape for 
$6.95. Funware 7119 Santa Fe Ave. 
Dallas, Tx. 75223 



SYNTAX ZX80 is published 

monthly by a wholly-owned 
subsidiary of The Harvard Group. 

Syntax ZX80, Inc. 

RD 2, Box 457, Harvard, MA 01451. 

Telephone 617/456-3661. 

12 issues, $29. Single issue, $4. 



Publisher: 
Editor: 



Kirtland H. Olson 
Ann L. Zevnik 



Printed by Joseph E. Marhefka, Jr. 
Clinton Offset Printers 
Clinton, MA 01510 

© Syntax ZX80, Inc., 1981. All 
rights reserved. Photocopying 
prohibited. ISSN 0273-2696 



YES! Please send me 12 issues of SYNTAX for $29. 

□ My check for $29 is enclosed. 
Make checks payable to: 
SYNTAX ZX80, INC. 

account number ^ 



□ Please charge my D MasterCard 

□ Diner's Club □ American Express 

□ VISA □ Carte Blanche account 



exp. date_ 
signature 
Name 



. bank number (MC only) . 



.Title. 



Organization 
Address 



City 

Day PhoneX 



.State . 



Evening Phone_L 



.Zip. 



) 



ZX815 



I own a □ Sinclair ZX80 □ Sinclair ZX81 



Telephone orders call 
617-456-3661 



23 



BUFFERED EXPANSION BUSS for ZX80/81 
For memory mapped peripherals. 
Unlimited applications. Perfect for 
experimenting w/ computer hardware. 

BARE BOARD AVAILABLE NOW 

*fully buffered, w/decoders to open 

8K of I/O space. Needs 8 chips. 
*4 connector positions to fit . 156" 

c/c 44 pins popular circuit cards. 
*2 connector positions to fit . 1" 

c/c. *Room for wire wrap. 
*all components readily available. 
*fingers for 16K memory pak. 
^complete documentation plus free 

plan for I/O port, 
-'plated thru holes .. legend. . solder 

mask. .gold plated fingers 

^provision for 3A voltage regulator 

BARE BOARD (w/one connector 

to the computer) $30 . 

Shipping and handling. .......$ 3. 

Calif .residents add $1.95 S.Tax 

Allow 4-6 weeks delivery. 

To order: specify for ZX80 or 

ZX81 and send check to: 

COMPUTER CONTINUUM, 301 16th Ave. 

San Francisco, CA 94118 

Product price/availability subject 

to change without notice. 

(ZX80 w/8K ROM will require minor 

circuit modification) . 

Complete kit available next month. 



EZRA GROUP II 

EZRA GROUP II 

The ZX80/81's are making a name 

with LOW prices . . . 

WE CHALLENGE THE SOFTWARE COMPANIES 

TO LOWER THEIR PRICES! 

for ZX81/ZX80/8k ROM 

IK and 16K RAM versions 

Biorhythms 1.00 

Graphics Billboard 1.00 

SPINNER T.M. (like Rubik' s) 16K. . 2 . 00 

Skew-a- Sketch (like Etch) 1.00 

Improved Pause (ZX81) 1.00 

Linear Programming Ask. 

Self Addressed Stamped Envelope 

Gets YOU Our goodies catalog 
ALL ORDERS AND CATALOG REQUESTS GET 
FREE Galactic Messages PROGRAM. 
EZRA GROUP II 
EZRA GROUP II 
P.O. Box 5222 San Diego, California 
(714)584-8291 92105 

TEXT EDITOR: (8KROM/16KRAM)Enter and 
edit any text or graphic, list/docmt 
$10.w/all updates $20. D.O'connell 
1219 W.Russell, San Antonio TX 78201 

PUT THAT ZX80/81 TO WORK with SORT. 
This great collating tool can count 
and file 1000s of items in over 29 
categories with just IK! $3 gets 
you list & notes to learn/build on. 
Tom Woods Box 64 Jefferson.NH 03583 



24 



X 

< 



H\RV\RD 
GROLP 

Bolton Road. Harvard. Mass. 01451 



First Class 



U.S. Postage 

PAID 
Harvard, MA 
Permit No. 8 

01451 






CD